package com.xr.miniprogram.service;

import com.xr.miniprogram.domain.MiniProgramComment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xr.miniprogram.domain.vo.MiniProgramCommentResultVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author da
 * @since 2023-09-12
 */
public interface IMiniProgramCommentService extends IService<MiniProgramComment> {


    /**
     * 根据服务id 统计各类评价
     * @param serviceId
     * @return
     */
    MiniProgramCommentResultVO selectRate(Long serviceId);

    /**
     * 根据服务id 分类获取评论列表
     * @param serviceId
     * @param topic
     * @return
     */
    List<MiniProgramComment> selectByServiceIdAndTopic(Long serviceId, Long topic);

    /**
     * 根据orderUserId 获取评论
     * @param orderUserId
     * @return
     */
    MiniProgramComment selectByOrderUserId(Long orderUserId);


}
